﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace Broker.Service
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码和配置文件中的接口名“IDataService”。
    [ServiceContract(SessionMode = SessionMode.Allowed)]
    public interface IDataService
    {
        [OperationContract]
        string IsNameExist(string name);

        [OperationContract]
        string Register(byte[] registrantInfoData, byte[] terminalInfoData, string activeCode);

        [OperationContract]
        string GetInviteCodeQty(byte[] registrantInfoData, byte[] terminalInfoData);

        [OperationContract]
        string GetInviteCode(byte[] registrantInfoData, byte[] terminalInfoData);

        [OperationContract]
        string GetClientScoreInfos(byte[] registrantInfoData, byte[] terminalInfoData);

        [OperationContract]
        string GetClientInfo(byte[] registrantInfoData, byte[] terminalInfoData, long dataTs, long regTs);
        
        //[OperationContract]
        //string GetProductMaxTs(byte[] registrantInfoData, byte[] terminalInfoData);

        [OperationContract]
        string GetScoreRecordMaxTs(byte[] registrantInfoData, byte[] terminalInfoData);

        [OperationContract]
        string GetScoreRecord(byte[] registrantInfoData, byte[] terminalInfoData, long regTs);

        [OperationContract]
        string CheckLastTimeStamp(long ts);
        [OperationContract]
        string UpdateTableData(string tableName, long minRow, long maxRow, long rowCount, long clientTs, string sqlWhere);
    }
}
